package cn.ruituo.service;/*
package cn.ruituo.service;

import cn.ruituo.dao.SubjectDao;
import cn.ruituo.entity.Page;
import cn.ruituo.entity.Subject;
import cn.ruituo.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

*/
/**
 * @author oldliu
 * @since 1.0
 *//*

public class SubjectService {
    public final static SubjectService service=new SubjectService();

    public Page<Subject> page(int pageNo, int pageSize, String su){
        SqlSession s= MyBatisUtil.get();
        try {
            SubjectDao dao = s.getMapper(SubjectDao.class);
            List<Subject> list = dao.page(pageNo, pageSize, su);
            int total=dao.pageTotal(su);
            return new Page<>(list,pageNo,total);
        }finally {
            MyBatisUtil.close(s);
        }
    }
}
*/
